const { logsFiles } = require('../../controllers/common/logs')

const { verifyToken } = require('../../utils/jwt.js')

const logsRoutes = (fastify, opts, done) => {
  fastify.get(
    '/admin/logs',
    {
      preHandler: verifyToken,
    },
    logsFiles
  )
  done()
}

module.exports = logsRoutes
